package org.lemon.transport.context.service.queue;

import org.lemon.transport.context.data.queue.message.QueueMessage;

import java.util.List;
import java.util.Set;

public interface QueueConsumer<T extends QueueMessage> {

    String getTopic();

    void subscribe();

    void subscribe(Set<TopicPartitionInfo> partitions);

    void unsubscribe();

    List<T> poll(long durationInMillis);

    void commit();

    public void reject();

    boolean isStopped();
}
